/******************************************************************************/
/* Files to Include                                                           */
/******************************************************************************/

#include <plib.h>            /* Include to use PIC32 peripheral libraries     */
#include <stdint.h>          /* For uint32_t definition                       */
#include <stdbool.h>         /* For true/false definition                     */
#include "user.h"            /* variables/params used by user.c               */

/******************************************************************************/
/* User Functions                                                             */
/******************************************************************************/

/* TODO Initialize User Ports/Peripherals/Project here */

void InitApp(void)
{
    /* Setup analog functionality and port direction */

    // Set the first A/D converter as an input
    EnableADC10();
    // Code example.  Need to set up for my own use
    OpenADC10(ADC_MODULE_OFF |
          ADC_IDLE_STOP | 
          ADC_FORMAT_SIGN_FRACT16 |
          ADC_CLK_INT0 |
          ADC_SAMPLE_INDIVIDUAL |
          ADC_AUTO_SAMPLING_ON, 
          ADC_VREF_AVDD_AVSS |
          ADC_SCAN_OFF | 
          ADC_ALT_INPUT_ON |
          ADC_SAMPLES_PER_INT_10, 
          ADC_SAMPLE_TIME_4 |
          ADC_CONV_CLK_PB |
          ADC_CONV_CLK_Tcy,
          ENABLE_AN1_ANA,
          SKIP_SCAN_AN0 | 
          SKIP_SCAN_AN3 | 
          SKIP_SCAN_AN4 | 
          SKIP_SCAN_AN5);

    

    /* Initialize peripherals */
}
